﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SessionText
{
    public partial class SessionText : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["text"]==null)
            {
                Session["text"] = "";
            }
            TextLiteral.Text = Session["text"].ToString();
        }

        protected void TextButton_Clicked(object sender, EventArgs e)
        {
            Session["text"] += TextBox.Text;
            TextLiteral.Text = Session["text"].ToString();
        }
    }
}